package ecode

import "errors"

var (
	ErrNotRegister = errors.New("未注册")
	ErrUsernameNotRegister = errors.New("用户名未注册")
	ErrEmailNotRegister = errors.New("邮箱未注册")
	ErrPassword = errors.New("密码错误")

	ErrBadParam = errors.New("参数有误")

)

var (
	ErrTopicNodeNameExist = errors.New("主题节点名已存在")
	ErrTopicNodeNoTopic = errors.New("该主题下还没有帖子")
	ErrTopicNotFound = errors.New("帖子未找到")
)

//internal
var (
	ErrInternalError = errors.New("服务器内部错误")
)

//ErrorCode error与http状态码
type ErrorCode struct {
	Err error				//error message
	Code int				//http status code
}